package netty.plc;

import com.plc.sdk.hslCommunication.core.types.OperateResultExOne;
import com.plc.sdk.siemens.SiemensPLCS;
import com.plc.sdk.siemens.SiemensS7Net;

/**
 * @Author zhangtao
 * @create 2021/11/23 15:55
 */
public class Test {
    public static void main(String[] args) {
        SiemensS7Net siemensS7Net = new SiemensS7Net(SiemensPLCS.S200Smart, "127.0.0.1");
        OperateResultExOne<Short> a = siemensS7Net.ReadInt16("V001");
        OperateResultExOne<Byte> c = siemensS7Net.ReadByte("V001");
        OperateResultExOne<Boolean> b = siemensS7Net.ReadBool("V001");
        System.out.println(a.ErrorCode);
        System.out.println(a.Message);
        System.out.println(a.Content);
        System.out.println(b.Content);
        System.out.println(c.Content);
    }
}
